import React, { Component } from 'react';
import { HashRouter } from "react-router-dom";
import { observer } from 'mobx-react';
import RouteWithSubRoutes from './component/RouteWithSubRoutes';
import Admin from './pages/Admin';



const paths = [
  {
    path: '/',
    exact: true,
    component: Admin,
  }
]

@observer
class App extends Component {
  render() {
    console.log('props', this.props)
    return (
      <HashRouter >
        <React.Fragment>
          {paths.map((route, i) => <RouteWithSubRoutes key={i} {...route} />)}
        </React.Fragment>
      </HashRouter >
    );
  }
}

export default observer(App);
